package com.hyx.api.controller.pc_admin;

import com.hyx.api.service.pc_admin.IStatisticsService;
import com.ruoyi.common.core.domain.AjaxResult;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页_统计相关Controller
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/statistics")
public class StatisticsController {

    private final IStatisticsService statisticsService;

    /**
     * 获取首页统计相关信息
     */
    @PreAuthorize("@ss.hasPermi('api:statistics:query')")
    @GetMapping(value = "queryIndexStatistics")
    public AjaxResult queryIndexStatistics() {
        return statisticsService.queryIndexStatistics();
    }

}
